package com.wx.disparent.mallparent.dao;

import com.wx.disparent.mallparent.commons.inface.IBaseMapper;
import com.wx.disparent.mallparent.entity.ProblemEntity;
import com.wx.disparent.mallparent.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface AdminUserMapper extends IBaseMapper<UserEntity> {

    List<UserEntity> findAll(Map map);

    UserEntity findByLoginMap(Map loginMap);

    List<UserEntity> search(String searchContext);

    UserEntity findUserEntityById(Integer id);

    Integer add(UserEntity userEntity);

    UserEntity findByUsername(String username);

    UserEntity findByPhone(String phone);

    UserEntity findByEmail(String email);

    Integer resetPw(Map map);

    List<ProblemEntity> findAllProblem();

    Integer updatePassWdById(UserEntity userEntity);

    List<UserEntity> findByReferId(Integer id);

    UserEntity findByUserName(String username);

    Integer updateById(UserEntity userEntity);

    Integer updateLastLogin(HashMap<String, Object> lastMap);

    List<UserEntity> lowerSearch(HashMap<String, Object> map);

    List<UserEntity> referSearch(HashMap<String, Object> map);
}
